//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        //TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
        // to see how IntelliJ IDEA suggests fixing it.


        Mediator mediator = new ConcreteMediator();


        Colleague unprocessColleague = new UnprocessColleague(mediator);

        Colleague lowwerColleague = new LowerColleague();

        Colleague upperColleague = new UpperColleague();
        //变化点：新添加一个同事类给中继者
        Colleague unSpaceColleague=new UnSpaceColleague();

        mediator.register(unprocessColleague);
        mediator.register(lowwerColleague);
        mediator.register(upperColleague);
        System.out.println("test01:原本输出+全小写+全大写------------------------------------------------");
        unprocessColleague.interactWithMediator("aAa Bb CC dd");

        mediator.register(unSpaceColleague);
        System.out.println("test02：原本输出+全小写+全大写+去空格------------------------------------------------");
        unprocessColleague.interactWithMediator("aAa bb CC dd");












    }
}